package alp.starcode.nudtportal.framework.mybatis.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * user_account（用户账号表）
 * </p>
 *
 * @author xwx
 * @since 2023-08-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("user_account")
@ApiModel(value = "UserAccount对象", description = "user_account（用户账号表）")
public class UserAccount extends Model<UserAccount> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户流水号")
    @TableId("user_id")
    private String userId;

    @ApiModelProperty(value = "用户姓名")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "登录账号")
    @TableField("login_account")
    private String loginAccount;

    @ApiModelProperty(value = "登录密码")
    @TableField("login_password")
    private String loginPassword;

    @ApiModelProperty(value = "一卡通卡号")
    @TableField("campus_number")
    private String campusNumber;

    @ApiModelProperty(value = "微信小程序ID")
    @TableField("wechat_id")
    private String wechatId;

    @ApiModelProperty(value = "支付宝小程序ID")
    @TableField("alipay_id")
    private String alipayId;

    @ApiModelProperty(value = "是否初始密码:0初始、1已修改")
    @TableField("is_initial_psd")
    private Integer isInitialPsd;

    @ApiModelProperty(value = "是否开通支付码:0未开通、1已开通")
    @TableField("is_open_qrcode")
    private Integer isOpenQrcode;

    @ApiModelProperty(value = "是否删除:0未删除、1已删除")
    @TableField("is_deleted")
    private Integer isDeleted;

    @ApiModelProperty(value = "是否有效：0有效、1无效")
    @TableField("is_disabled")
    private Integer isDisabled;

    @ApiModelProperty(value = "是否多设备登录：0不支持、1支持")
    @TableField("is_multi_device")
    private Boolean isMultiDevice;

    @ApiModelProperty(value = "锁定时间")
    @TableField("locked_time")
    private Long lockedTime;

    @ApiModelProperty(value = "数据来源:内网同步、管理员添加")
    @TableField("data_source")
    private String dataSource;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Long createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_time")
    private Long updateTime;

    @ApiModelProperty(value = "校园卡状态：0销卡，1正常，2挂失，3冻结，4预销卡，5锁卡")
    @TableField("campus_status")
    private Integer campusStatus;

    @ApiModelProperty(value = "锁定类型：管理员锁定、系统锁定")
    @TableField("locked_type")
    private String lockedType;

    @ApiModelProperty(value = "消费限额")
    @TableField("deal_quota")
    private BigDecimal dealQuota;

    @ApiModelProperty(value = "消费限额")
    @TableField("deal_status")
    private Integer dealStatus;

    @ApiModelProperty("校园卡卡帐号")
    @TableField("campus_card_account_number")
    private String campusCardAccountNumber;


    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

}
